package com.miaomiaojia.android;

import java.util.ArrayList;
import java.util.List;
import com.miaomiaojia.control.MyTabHost;
import com.miaomiaojia.entity.MyTabHostArge;
import android.os.Bundle;
import android.app.ActivityGroup;
import android.content.Intent;

public class DefaultActivity extends ActivityGroup {
	// http://www.cnblogs.com/over140/archive/2011/03/02/1968042.html

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		List<Intent> listIntents = new ArrayList<Intent>();
		listIntents.add(new Intent(this, IndexActivity.class));
		listIntents.add(new Intent(this, ListActivity.class));
		listIntents.add(new Intent(this, MyActivity.class));
		listIntents.add(new Intent(this, SearchActivity.class));

		MyTabHostArge arge = new MyTabHostArge(R.layout.tabhost_default, true,
				listIntents, true, null);
		MyTabHost myTabHost = new MyTabHost(this);
		myTabHost.setMyTabHostArge(arge);
		myTabHost.setTabInit();
		setContentView(myTabHost);
	}
}
